import { $get, $delete } from '@js/request'
import { ConditionSchema } from '@src/components/schema/condition'
import { ArbitratorSchema } from '@components/schema/arbitrator'

// 获取枚举值
export async function getListRequest (d: { condition: ConditionSchema[], page: number, limit: number }): Promise<{ list: ArbitratorSchema[], total: number }> {
  const res = await $get('/api/commission/arbitrator', {
    condition: JSON.stringify(d.condition),
    page: d.page,
    limit: d.limit
  })
  const list: ArbitratorSchema[] = res.data.list
  list.forEach((li, i) => {
    li.orderno = (d.page - 1) * d.limit + i + 1
  })
  return res.data
}
